package com.football.springboot.service;

import com.football.springboot.entity.*;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 李越
 * @since 2023-03-03
 */
public interface IPlayerDataService extends IService<PlayerData> {

    //新增球员的赛季比赛数据（出场次数从0到1，第一次新增球员单场比赛数据，创建一行数据）
    PlayerData addplayerdata(PlayerDataSingle playerDataSingle);

    //找到要更新的那行数据（球员赛季数据）
    PlayerData getupdateplayerdata(Integer playerId,Integer leagueId);

    //新增球员的赛季比赛数据（出场次数从1到n,新增两次出场及以上的比赛数据时）
    PlayerData updateplayerdata(PlayerData playerData,PlayerDataSingle playerDataSingle);

    //修改球员的赛季比赛数据(当你修改已经添加的球员比赛数据时)
    PlayerData updateplayerdataexist(PlayerData playerData,PlayerDataSingle playerDataSinglebefore,PlayerDataSingle playerDataSingle);

    //查找球员赛季数据的球队信息
    Team getteaminfo(Integer teamId);

    //查找球员赛季数据的联赛信息
    League getleagueinfo(Integer leagueId);

    //查找球员赛季数据的球员信息
    Player getplayerinfo(Integer playerId);

    //计算球员榜单一些数据
    void countplayerleague(PlayerData playerData);

    //累加一个球员所有数据之和
    PlayerData playerDataallleague(List<PlayerData> playerDataList,PlayerData playerDataall);

    //将playerdata存入到playerdatamap中
    Map<String,Object> getplayerdatamap(Map<String,Object> playerdatamap, PlayerData playerData);

    //将playerattackdata存入到playerdatamap中
    Map<String,Object> getplayerattackdatamap(Map<String,Object> playerdatamap, PlayerData playerData);

    //将playerpassdata存入到playerdatamap中
    Map<String,Object> getplayerpassdatamap(Map<String,Object> playerdatamap, PlayerData playerData);

    //将playerdata的average存入到playerdatamap中
    Map<String,Object> getplayeravedatamap(Map<String,Object> playeravedatamap,PlayerData playerData);

    //将playerattackdata的average存入到playerdatamap中
    Map<String,Object> getplayeraveattackdatamap(Map<String,Object> playeravedatamap,PlayerData playerData);

    //将playerpassdata的average存入到playerdatamap中
    Map<String,Object> getplayeravepassdatamap(Map<String,Object> playeravedatamap,PlayerData playerData);

    //将playerdatasingle存入到pdsmap中
    Map<String,Object> getpdsmap(Map<String,Object> pdsmap,PlayerDataSingle playerDataSingle);

    //将playerattackdatasingle存入到pdsmap中
    Map<String,Object> getattackpdsmap(Map<String,Object> pdsmap,PlayerDataSingle playerDataSingle);

    //将playerpassdatasingle存入到pdsmap中
    Map<String,Object> getpasspdsmap(Map<String,Object> pdsmap,PlayerDataSingle playerDataSingle);

    //将playerfouldatasingle存入到pdsmap中
    Map<String,Object> getfoulpdsmap(Map<String,Object> pdsmap,PlayerDataSingle playerDataSingle);

}
